package com.laijiale.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import static com.laijiale.constant.RE.CONTENT_RE;
import static com.laijiale.constant.RE.CONTENT_RE_MSG;

/**
 * @author laijiale
 * @date 2025年01月11日 10:01
 */
@Schema(name = "评论修改DTO")
@Data
public class CommentUpdateDTO {
    @NotNull(message = "主键不能为空")
    @Schema(description = "主键")
    private Long id;
    @Schema(description = "集次表ID，季次表外键")
    private Long fkEpisodeId;
    @Schema(description = "用户表ID，季次表外键")
    private Long fkUserId;
    @Schema(description = "父评论ID，θ视为根评论")
    private Long pid;
    @Pattern(regexp = CONTENT_RE, message = CONTENT_RE_MSG)
    @Schema(description = "评论内容")
    private String content;
}
